from launch import LaunchDescription
from launch_ros.actions import Node


def generate_launch_description():
    return LaunchDescription([
        # Node(
        #     package="cpp_realsense",
        #     executable="cvsub",
        #     name="cvsub1",
        #     output="screen"
        # ),

        Node(
            package="camcal_center",
            executable="camcal_center",
            name="camcal_center",
            output="screen"
        ),

        Node(
            package="robot_server_cmd",
            executable="robot_server_cmd",
            name="robot_server_cmd",
            output="screen"
        ),

        Node(
            package="robot_server_pc",
            executable="robot_server_pc",
            name="robot_server_pc",
            output="screen"
        ),

        Node(
            package="cpp_realsense",
            executable="cpp_realsense",
            name="rs_1",
            output="screen",
            # respawn=True,
            parameters=[
                {
                    "serial_num": "809512060623",
                    "rs_index": 0
                }
            ]
        ),

        Node(
            package="cpp_realsense",
            executable="cpp_realsense",
            name="rs_2",
            output="screen",
            # respawn=True,
            parameters=[
                {
                    "serial_num": "810512061113",
                    "rs_index": 1
                }
            ]
        ),

        Node(
            package="cpp_realsense",
            executable="cpp_realsense",
            name="rs_3",
            output="screen",
            # respawn=True,
            parameters=[
                {
                    "serial_num": "810512062362",
                    "rs_index": 2}
            ]
        ),

        Node(
            package="robot_claw",
            executable="robot_claw",
            name="robot_claw",
            output="screen"
        ),

        
        Node(
            package="serial_pinch",
            executable="serial_pinch",
            name="serial_pinch",
            output="screen",
            parameters=[
                {
                    "com_name": "COM7",
                    "max_i": 200,
                    "cmder_type": 1
                }
            ]
        ),

        Node(
            package="serial_peel",
            executable="serial_peel",
            name="serial_peel",
            output="screen",
            parameters=[
                {
                    "com_name": "COM8"
                }
            ]
        ),

        Node(
            package="robot_arm",
            executable="robot_arm",
            name="robot_arm",
            output="screen",
            parameters=[
                {
                    "ip": "192.168.0.25",
                    "port" : 8000
                }
            ]
        ),

        
        Node(
            package="dl_client",
            executable="dl_client",
            name="dl_client",
            output="screen",
            parameters=[
                {
                    "ip": "192.168.1.145",
                    "port" : 7001
                }
            ]
        ),


        Node(
            package="slam_websocket",
            executable="slam_websocket",
            name="slam_websocket",
            output="screen"
        )

    ])
